{extend name="layout"/}
{block name="content"}
<div class="panel">
    <div class="panel-heading">
        <span class="panel-title">[{$modelInfo.title}]模型导出数据</span>
    </div>

    <form action=""  method="post" class="panel-body">
        <div class="form-group">
            {if isset($columnList)}
            <fieldset class="form-group">
                <label>所属栏目</label>
                <select id="cname"  name="cname" class="form-control  select2-hidden-accessible"  style="width: 100%" data-allow-clear="true" tabindex="-1" aria-hidden="true">
                    <option value=""></option>
                    {volist name="columnList" id="vo" }
                    {if $vo.type==2 && $vo.model_id==$mid}
                    <option {if ''!=$cname && $cname==$vo.name}selected{/if} value="{$vo.name}">{:str_repeat('┝┈┈', $vo['deep']-1)}{$vo.title}</option>
                    {/if}
                    {/volist}
                </select>
            </fieldset>
            {/if}
            <fieldset class="form-group">
                <labe>发布时间区间</label>
                    <input type="text" class="form-control" id="creattime" name="creattime" placeholder="选择时间范围,留空则不限时间" value="">
                    <small class="text-muted" ></small>
            </fieldset>
            <fieldset class="form-group">
                <labe>限制上限条数</label>
                    <input type="number" class="form-control"  name="limitnum" placeholder="" value="">
                    <small class="text-muted" >留空为不限制</small>
            </fieldset>
        </div>
        <div class="panel-footer text-right">
            <input type="submit" class="btn btn-primary" value="导出数据">
        </div>
    </form>

</div>
{/block}

{block name="javascript"}
<script>
    $(function () {
        $('.custom-file').pxFile();
        $('#cname').select2({
            placeholder: '全部栏目'
        });
        $('#creattime').daterangepicker({
            timePicker: true, //是否显示小时和分钟  
            timePickerIncrement: 1, //时间的增量，单位为分钟  
            timePicker12Hour: false, //是否使用12小时制来显示时间  
            locale: {
                format: 'YYYY/MM/DD HH:mm:ss',
                daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
                monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                applyLabel: '确定',
                cancelLabel: '取消',
                firstDay: 1
            }
        }, function (start, end, label) {
        }).on('cancel.daterangepicker', function () {
            $(this).val('');
        }).val('');
    });
</script>
{/block}